<template>
	<view :style="{height:PhoneInfo.windowHeight + 'px',width:PhoneInfo.windowWidth + 'px'}">
		<mvBar :mysNavConfig="mysNavConfig" @onLeftClick="onLeftClick"></mvBar>
		<u-toast ref="uToast"></u-toast>
		<view class="upwardside">
			<view class="eqponame" @click="alterpoint">{{sensorinfo.equipmentName}}-{{sensorinfo.pointName}}</view>
			<view class="upview">
				<image src='../../static/img/userCenter/sensor.png' class='toppng' mode='aspectFit'></image>
				<view class="topzuosn">{{sensorinfo.devicePrototypeRealId}}</view>
				<view>
					<u-input border="none" inputAlign='center' color="#8f939c" v-model="sensorinfo.name" maxlength="20">
					</u-input>
				</view>
			</view>
			<view class="upview">
				<image :src='powerpng(sensorinfo.recentBasicDatas.power)' class='toppng' mode='aspectFit'
					@click='trend(1)'></image>
				<view
					v-if="sensorinfo.recentBasicDatas!==''&&sensorinfo.recentBasicDatas.power!==undefined&&sensorinfo.recentBasicDatas.power!==''"
					:class="['powertext',sensorinfo.recentBasicDatas.power>=95?'powerlv':sensorinfo.recentBasicDatas.power>=90&&sensorinfo.recentBasicDatas.power<95?'powerhuang':'powerhong']"
					@click='trend(1)'>
					{{sensorinfo.recentBasicDatas.power+'%'}}
				</view>
				<view v-else :class="['powertext','powerhei']">
					暂无
				</view>
				<view class="zaixin">
					<u-icon name="reload" :color="sensorinfo.onlineStatus==1?'#2979ff':'#767a82'" size="24"
						:labelColor="sensorinfo.onlineStatus==1?'#2979ff':'#767a82'"
						:label="sensorinfo.onlineStatusName" labelPos='left' labelSize='16' space='15'></u-icon>
				</view>
			</view>
			<view class="center">
				<view class="centerview" style="color: #3eca9d;" @click='trend(3)'>
					<image src='../../static/img/sensorinfo/z.png' class='toppng' mode='aspectFit'></image>
					<view class="dipsigntext">
						{{sensorinfo.recentBasicDatas==''||sensorinfo.recentBasicDatas.zan==undefined||sensorinfo.recentBasicDatas.zan===''?'暂无':sensorinfo.recentBasicDatas.zan+'°'}}
					</view>
					<view class="dipsigntitle">Z轴倾角</view>
				</view>
				<view class="centerview" style="color: #c89cdf;" @click='trend(2)'>
					<image src='../../static/img/sensorinfo/xinhao.png' class='toppng' mode='aspectFit'></image>
					<view class="dipsigntext">
						{{sensorinfo.recentBasicDatas==''||sensorinfo.recentBasicDatas.rsrp==undefined||sensorinfo.recentBasicDatas.rsrp===''?'暂无':sensorinfo.recentBasicDatas.rsrp+'dBm'}}({{sensorinfo.rsrpLevel}})
					</view>
					<view class="dipsigntitle">信号强度</view>
				</view>
				<view class="centerview" style="color: #ff928b;" @click='trend(3)'>
					<image src='../../static/img/sensorinfo/y.png' class='toppng' mode='aspectFit'></image>
					<view class="dipsigntext">
						{{sensorinfo.recentBasicDatas==''||sensorinfo.recentBasicDatas.yan==undefined||sensorinfo.recentBasicDatas.yan===''?'暂无':sensorinfo.recentBasicDatas.yan+'°'}}
					</view>
					<view class="dipsigntitle">Y轴倾角</view>
				</view>
				<view class="centerview" style="color: #8f9bfd;" @click='trend(3)'>
					<image src='../../static/img/sensorinfo/x.png' class='toppng' mode='aspectFit'></image>
					<view class="dipsigntext">
						{{sensorinfo.recentBasicDatas==''||sensorinfo.recentBasicDatas.xan==undefined||sensorinfo.recentBasicDatas.xan===''?'暂无':sensorinfo.recentBasicDatas.xan+'°'}}
					</view>
					<view class="dipsigntitle">X轴倾角</view>
				</view>
			</view>
			<view class="below">
				<view class="status">
					<view>当前状态: {{sensorinfo.currentWorkingStatusName}}</view>
					<view class="right">
						<u-icon name="arrow-rightward" color="#2979ff" size="28"></u-icon>
					</view>
					<view @click="showtarget=true">目标状态: {{sensorinfo.targetWorkingStatusName}}</view>
				</view>
				<u-form labelPosition="left">
					<u-form-item label="待机状态消息发送间隔" label-width="160">
						<u-input border="none" type="number" v-model="sensorinfo.waitingInterval">
							<template slot="suffix">
								<view class="danwei">h</view>
							</template>
						</u-input>
					</u-form-item>
					<u-form-item label="敲击检测" label-width="80%">
						<u-switch v-model="sensorinfo.knockIsOpen" @change="knockonoff"></u-switch>
					</u-form-item>
					<u-form-item label="敲击阈值" label-width="75">
						<u-input border="none" type="number" v-model="sensorinfo.knockThreshold" placeholder="请输入敲击阈值">
						</u-input>
					</u-form-item>
					<u-form-item label="活动检测" label-width="80%">
						<u-switch v-model="sensorinfo.activeIsOpen" @change="activeonoff"></u-switch>
					</u-form-item>
					<u-form-item label="活动阈值" label-width="75">
						<u-input border="none" type="number" v-model="sensorinfo.activeThreshold" placeholder="请输入活动阈值">
						</u-input>
					</u-form-item>
				</u-form>
			</view>
		</view>
		<view class="button">
			<u-button type="primary" shape='circle'
				color="linear-gradient(to right, rgb(40, 166, 225), rgb(67, 132, 236))" text="修改信息"
				@click="altersensor">
			</u-button>
		</view>
		<view class="button">
			<u-button type="warning" shape='circle'
				color="linear-gradient(to right, rgb(255, 204, 0), rgb(248, 160, 26))" text="测点改绑" @click="pointalter">
			</u-button>
		</view>
		<!-- 目标状态 -->
		<u-action-sheet :show="showtarget" overlayOpacity='0.5' :actions="actions" title="请选择目标状态"
			@close="showtarget = false" @select="sexSelect">
		</u-action-sheet>
		<!-- 选择设备和测点 -->
		<u-popup :round="10" bgColor='#f2f5f9' :show="showpopup" mode='center' :closeOnClickOverlay='true'
			@close="showpopup=false" zIndex="10070">
			<view class="TC">
				<view class="TCtitle">请选择您要绑定的测点</view>
				<u-form labelPosition="left">
					<u-form-item label="设备" prop="equipmentName" borderBottom
						@click="equipmentshow = true;hideKeyboard()" ref="item3">
						<u--input v-model="popup.equipmentName" disabled disabledColor="#f2f5f9" placeholder="请选择设备"
							border="none">
						</u--input>
						<u-icon slot="right" name="arrow-right"></u-icon>
					</u-form-item>
					<u-form-item label="测点" prop="pointName" borderBottom @click="pointshow = true;hideKeyboard()"
						ref="item4">
						<u--input v-model="popup.pointName" disabled disabledColor="#f2f5f9" placeholder="请选择测点"
							border="none">
						</u--input>
						<u-icon slot="right" name="arrow-right"></u-icon>
					</u-form-item>
				</u-form>
				<view style="width: 90%;margin: 10% auto 0%;">
					<u-button shape='circle' type="primary"
						color="linear-gradient(to right, rgb(39, 167, 225), rgb(67, 129, 234))" text="确定"
						@click="alterpopup">
					</u-button>
				</view>
			</view>
		</u-popup>
		<!-- 设备 -->
		<u-picker closeOnClickOverlay :immediateChange='true' @cancel="equipmentshow = false"
			@confirm="equipmentconfirm" :show="equipmentshow" :columns="equipmentcolumns" keyName="name">
		</u-picker>
		<!-- 测点 -->
		<u-picker closeOnClickOverlay :immediateChange='true' @cancel="pointshow = false" @confirm="pointconfirm"
			:show="pointshow" :columns="pointcolumns" keyName="name"></u-picker>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				PhoneInfo: '',
				mysNavConfig: {
					/* 占位开启  */
					navPadding: true,
					/* 背景 */
					bgColor: "#2979FF",
					/* 标题 （屏幕中心居中 两边图标中心居中使用slot center1） */
					navTitle: {
						text: "传感器信息",
						color: "#ffffff",
						fontSize: "18px", // px upx rpx
						fontWeight: "500", // 100 - 700
					},
					isCustomFn: true,
					btnType: "type2",
					type2Config: {
						// 左图标
						leftPath: "/static/img/back.png",
						// 右图标
						rightPath: "/static/img/home.png",
						// 圆角
						radius: "40rpx",
					}
				},
				macCode: '',
				userinfo: '',
				sensorinfo: {
					devicePrototypeRealId: '',
					equipmentName: '',
					pointName: '',
					recentBasicDatas: {
						power: '',
						xan: '',
						yan: '',
						zan: '',
						rsrp: '',
					},
					rsrpLevel: '未测定',
					onlineStatusName: '',
					currentWorkingStatusName: '',
					targetWorkingStatusName: '',
				},
				showtarget: false,
				actions: [{
						id: 3,
						name: '休眠',
					},
					{
						id: 2,
						name: '待机',
					},
					{
						id: 1,
						name: '运行',
					}
				],
				equipmentshow: false,
				equipmentcolumns: [],
				pointshow: false,
				pointcolumns: [],
				showpopup: false, //测点改绑
				popup: {
					equipmentName: '',
					equipmentRealId: '',
					pointName: '',
					pointRealId: '',
				},
			}
		},
		onLoad(parameter) {
			this.PhoneInfo = this.$utils.GetPhoneInfo();
			this.macCode = parameter.macCode
			this.userinfo = uni.getStorageSync('userinfo');
			//获取传感器信息
			this.getsensorinfo()
		},
		methods: {
			//电量图片
			powerpng(value) {
				if (value == '' || value == undefined | value == null) {
					return '../../static/img/sensorinfo/powerwu.png';
				} else {
					if (value >= 95) {
						return '../../static/img/sensorinfo/power.png';
					} else if (value < 95 && value >= 90) {
						return '../../static/img/sensorinfo/powe.png';
					} else {
						return '../../static/img/sensorinfo/pow.png';
					}
				}
			},
			//获取传感器信息
			getsensorinfo() {
				uni.showLoading({
					title: "加载中...",
					mask: true,
				});
				uni.request({
					url: getApp().globalData.serverAddress + this.$uri.Uri_lookSensorInfo
						.replace("{userRealId}",
							this.userinfo.userRealId).replace("{devicePrototypeRealId}",
							this.macCode),
					method: "GET",
					success: (res) => {
						if (res.statusCode !== 200) {
							this.$utils.showToast(this, '服务器错误,请联系技术支持人员!', 'error');
							return
						}
						if (res.data.code == 0) {
							this.sensorinfo = res.data.data;
							this.sensorinfo.waitingInterval = this.sensorinfo.waitingInterval / 3600;
							if (JSON.stringify(this.sensorinfo.recentBasicDatas) == "{}") {
								this.sensorinfo.recentBasicDatas = '';
							}
							//获取设备信息
							this.getequipment()
						} else {
							this.$utils.showToast(this, res.data.msg, 'error');
						}
					},
					fail: () => {
						this.$utils.showToast(this, '加载失败！', 'error');
					},
					complete: () => {
						uni.hideLoading();
					}
				})
			},
			//获取设备信息
			getequipment() {
				this.equipmentcolumns = [];
				uni.request({
					url: getApp().globalData.serverAddress + this.$uri.Uri_getAllequipment
						.replace("{userRealId}",
							this.userinfo.userRealId),
					method: "GET",
					success: (res) => {
						if (res.statusCode !== 200) {
							this.$utils.showToast(this, '服务器错误,请联系技术支持人员!', 'error');
							return
						}
						if (res.data.code == 0) {
							this.equipmentcolumns.push(res.data.data);
						}
					}
				})
			},
			//测点信息管理
			alterpoint() {
				let parameterinfo = {
					pointRealId: this.sensorinfo.pointRealId,
					equipmentRealId: this.sensorinfo.equipmentRealId,
					name: this.sensorinfo.equipmentName,
					entrust: 0, //传感器都是自己的,所以跳转的话,肯定是创建
				}
				let parameterinfodata = JSON.stringify(parameterinfo);
				uni.navigateTo({
					url: `/pages/equipmentManage/editPoint?content=${encodeURIComponent(parameterinfodata)}`
				})
			},
			//目标状态选择
			sexSelect(index) {
				this.sensorinfo.targetWorkingStatus = index.id;
				this.sensorinfo.targetWorkingStatusName = index.name;
				//休眠时敲击开,活动关
				if (this.sensorinfo.targetWorkingStatus == 3) {
					this.sensorinfo.knockIsOpen = true;
					this.sensorinfo.activeIsOpen = false;
				}
				//待机时活动关敲击无所谓
				if (this.sensorinfo.targetWorkingStatus == 2) {
					this.sensorinfo.activeIsOpen = false;
				}
			},
			//测点改绑
			pointalter() {
				this.popup.equipmentName = this.sensorinfo.equipmentName;
				this.popup.equipmentRealId = this.sensorinfo.equipmentRealId;
				this.popup.pointName = this.sensorinfo.pointName;
				this.popup.pointRealId = this.sensorinfo.pointRealId;
				this.showpopup = true;
			},
			//修改测点
			alterpopup() {
				var twodata = new Object();
				twodata.name = this.sensorinfo.name; //别名
				twodata.PointRealId = this.popup.pointRealId; //测点id
				twodata.EquipmentRealId = this.popup.equipmentRealId; //设备id
				twodata.TargetWorkingStatus = this.sensorinfo.targetWorkingStatus; //目标状态
				twodata.KnockIsOpen = this.sensorinfo.knockIsOpen; //敲击开关
				twodata.ActiveIsOpen = this.sensorinfo.activeIsOpen; //活动开关
				twodata.KnockThreshold = this.sensorinfo.knockThreshold; //敲击阈值
				twodata.ActiveThreshold = this.sensorinfo.activeThreshold; //活动阈值
				twodata.WaitingInterval = this.sensorinfo.waitingInterval; //待机状态消息发送间隔
				uni.request({
					url: getApp().globalData.serverAddress + this.$uri.Uri_alterSensor.replace(
							"{userRealId}", this.userinfo.userRealId)
						.replace("{devicePrototypeRealId}", this.macCode),
					data: JSON.stringify(twodata),
					dataType: "json",
					method: "POST",
					success: (res) => {
						if (res.statusCode !== 200) {
							this.$utils.showToast(this, '服务器错误,请联系技术支持人员!', 'error');
							return
						}
						if (res.data.code == 0) {
							this.showpopup = false;
							this.sensorinfo.equipmentName = this.popup.equipmentName;
							this.sensorinfo.equipmentRealId = this.popup.equipmentRealId;
							this.sensorinfo.pointName = this.popup.pointName;
							this.sensorinfo.pointRealId = this.popup.pointRealId;
							this.$utils.showToast(this, '测点改绑成功！', 'success');
						} else {
							uni.showToast({
								title: res.data.msg,
								icon: 'none',
								duration: 2000,
								mask: true,
							});
						}
					},
					fail: () => {
						this.$utils.showToast(this, '测点改绑失败！', 'error');
					},
					complete: () => {
						uni.hideLoading();
					}
				})
			},
			//返回
			onLeftClick() {
				uni.navigateBack({
					delta: 1
				});
			},
			//趋势图
			trend(value) {
				var pointTrend = {
					pointRealId: this.sensorinfo.pointRealId,
					equipmentRealId: this.sensorinfo.equipmentRealId,
					nametitle: this.sensorinfo.equipmentName + '-' + this.sensorinfo.pointName,
					entrust: 0,
				}
				this.$store.commit('alterpointTrend', pointTrend);
				if (value == 1) {
					uni.navigateTo({ //电量
						url: '/pages/equipment/pointTrend?id=5'
					})
				} else if (value == 2) {
					uni.navigateTo({ //信号强度
						url: '/pages/equipment/pointTrend?id=6'
					})
				} else {
					uni.navigateTo({ //倾角
						url: '/pages/equipment/pointTrend?id=41'
					})
				}
			},
			//隐藏软键盘
			hideKeyboard() {
				uni.hideKeyboard()
			},
			//敲击
			knockonoff(e) {
				if (this.sensorinfo.targetWorkingStatus == 1) {
					if (e) {
						if (this.sensorinfo.activeIsOpen == true) {
							this.$utils.showToast(this, '目标状态为运行时,敲击检测和活动检测只能有一个被打开!', 'waring');
							this.sensorinfo.activeIsOpen = false;
						}
					}
				} else if (this.sensorinfo.targetWorkingStatus == 2) {
					if (this.sensorinfo.activeIsOpen == true) {
						this.$utils.showToast(this, '目标状态为待机时,活动检测不能打开!', 'waring');
						this.sensorinfo.activeIsOpen = false;
					}
				} else {
					if (this.sensorinfo.knockIsOpen == false || this.sensorinfo.activeIsOpen == true) {
						this.$utils.showToast(this, '目标状态为休眠时,敲击检测不能关闭,活动检测不能打开!', 'waring');
						this.sensorinfo.knockIsOpen = true;
						this.sensorinfo.activeIsOpen = false;
					}
				}
			},
			//活动
			activeonoff(e) {
				if (this.sensorinfo.targetWorkingStatus == 1) {
					if (e) {
						if (this.sensorinfo.knockIsOpen == true) {
							this.$utils.showToast(this, '目标状态为运行时,敲击检测和活动检测只能有一个被打开!', 'waring');
							this.sensorinfo.knockIsOpen = false;
						}
					}
				} else if (this.sensorinfo.targetWorkingStatus == 2) {
					if (this.sensorinfo.activeIsOpen == true) {
						this.$utils.showToast(this, '目标状态为待机时,活动检测不能打开!', 'waring');
						this.sensorinfo.activeIsOpen = false;
					}
				} else {
					if (this.sensorinfo.knockIsOpen == false || this.sensorinfo.activeIsOpen == true) {
						this.$utils.showToast(this, '目标状态为休眠时,敲击检测不能关闭,活动检测不能打开!', 'waring');
						this.sensorinfo.knockIsOpen = true;
						this.sensorinfo.activeIsOpen = false;
					}
				}
			},
			//修改传感器
			altersensor() {
				if (this.sensorinfo.waitingInterval == '') {
					this.$utils.showToast(this, "待机状态消息发送间隔不能为空!", 'warning');
					return;
				}
				if (isNaN(Number(this.sensorinfo.waitingInterval))) {
					this.$utils.showToast(this, "待机状态消息发送间隔中只能输入数字！", 'warning');
					this.sensorinfo.waitingInterval = '';
					return;
				}
				if (Number(this.sensorinfo.waitingInterval) < 1) {
					this.$utils.showToast(this, "待机状态消息发送间隔最小为1小时!", 'warning');
					this.sensorinfo.waitingInterval = '';
					return;
				}
				if (Number(this.sensorinfo.waitingInterval) > 48) {
					this.$utils.showToast(this, "待机状态消息发送间隔最大为48小时!", 'warning');
					this.sensorinfo.waitingInterval = '';
					return;
				}
				if (this.sensorinfo.knockThreshold == '') {
					this.$utils.showToast(this, "敲击阈值不能为空!", 'warning');
					return;
				}
				if (this.sensorinfo.activeThreshold == '') {
					this.$utils.showToast(this, "活动阈值不能为空!", 'warning');
					return;
				}
				if (isNaN(Number(this.sensorinfo.knockThreshold))) {
					this.$utils.showToast(this, "敲击阈值中只能输入数字！", 'warning');
					this.sensorinfo.knockThreshold = '';
					return;
				}
				if (isNaN(Number(this.sensorinfo.activeThreshold))) {
					this.$utils.showToast(this, "活动阈值中只能输入数字！", 'warning');
					this.sensorinfo.activeThreshold = '';
					return;
				}
				if (Number(this.sensorinfo.knockThreshold) < 1) {
					this.$utils.showToast(this, "敲击阈值最小为1!", 'warning');
					this.sensorinfo.knockThreshold = '';
					return;
				}
				if (Number(this.sensorinfo.knockThreshold) > 240) {
					this.$utils.showToast(this, "敲击阈值最大为240!", 'warning');
					this.sensorinfo.knockThreshold = '';
					return;
				}
				if (Number(this.sensorinfo.activeThreshold) < 1) {
					this.$utils.showToast(this, "活动阈值最小为1!", 'warning');
					this.sensorinfo.activeThreshold = '';
					return;
				}
				if (Number(this.sensorinfo.activeThreshold) > 240) {
					this.$utils.showToast(this, "活动阈值最大为240!", 'warning');
					this.sensorinfo.activeThreshold = '';
					return;
				}
				let alterinfo = new Object();
				alterinfo.name = this.sensorinfo.name; //别名
				alterinfo.PointRealId = this.sensorinfo.pointRealId; //测点id
				alterinfo.EquipmentRealId = this.sensorinfo.equipmentRealId; //设备id
				alterinfo.TargetWorkingStatus = this.sensorinfo.targetWorkingStatus; //工作状态
				alterinfo.KnockIsOpen = this.sensorinfo.knockIsOpen;
				alterinfo.ActiveIsOpen = this.sensorinfo.activeIsOpen;
				alterinfo.KnockThreshold = this.sensorinfo.knockThreshold;
				alterinfo.ActiveThreshold = this.sensorinfo.activeThreshold;
				alterinfo.WaitingInterval = this.sensorinfo.waitingInterval;
				uni.showLoading({
					title: "修改中...",
					mask: true,
				});
				uni.request({
					url: getApp().globalData.serverAddress + this.$uri.Uri_alterSensor.replace(
							"{userRealId}", this.userinfo.userRealId)
						.replace("{devicePrototypeRealId}", this.macCode),
					data: JSON.stringify(alterinfo),
					dataType: "json",
					method: "POST",
					success: (res) => {
						if (res.statusCode !== 200) {
							this.$utils.showToast(this, '服务器错误,请联系技术支持人员!', 'error');
							return
						}
						if (res.data.code == 0) {
							this.$utils.showToast(this, "修改成功！", 'success', 5);
						} else {
							this.$utils.showToast(this, res.data.msg, 'error');
						}
					},
					fail: () => {
						this.$utils.showToast(this, '修改失败！', 'error');
					},
					complete: () => {
						uni.hideLoading();
					}
				})
			},
			//设备
			equipmentconfirm(e) {
				this.popup.equipmentName = e.value[0].name
				this.popup.equipmentRealId = e.value[0].equipmentRealId
				//选择设备以后清空上一次的测点id和名称以及列表
				this.popup.pointName = ""
				this.popup.pointRealId = ""
				this.pointcolumns = []
				for (let item of this.equipmentcolumns[0]) {
					if (item.equipmentRealId == this.popup.equipmentRealId) {
						this.pointcolumns.push(item.points)
					}
				}
				this.equipmentshow = false
			},
			//测点
			pointconfirm(e) {
				this.popup.pointName = e.value[0].name
				this.popup.pointRealId = e.value[0].pointRealId
				this.pointshow = false
			},
			//刷新传感器在线状态
			refresh() {
				uni.showLoading({
					title: "刷新中...",
					mask: true,
				});
				uni.request({
					url: getApp().globalData.serverAddress + this.$uri.Uri_lookSensorInfo.replace("{userRealId}",
							this.userinfo.userRealId)
						.replace("{devicePrototypeRealId}", this.macCode),
					method: "GET",
					success: (res) => {
						if (res.statusCode !== 200) {
							this.$utils.showToast(this, '服务器错误,请联系技术支持人员!', 'error');
							return
						}
						if (res.data.code == 0) {
							//将传感器的在线状态赋值给sensorinfo
							this.sensorinfo.onlineStatus = res.data.data.onlineStatus;
							this.sensorinfo.onlineStatusName = res.data.data.onlineStatusName;
							this.$utils.showToast(this, '刷新成功！', 'success');
						} else {
							this.$utils.showToast(this, res.data.msg, 'error');
						}
					},
					fail: () => {
						this.$utils.showToast(this, '刷新失败！', 'error');
					},
					complete: () => {
						uni.hideLoading();
					}
				})
			}
		}
	}
</script>
<style lang="scss" scoped>
	.upwardside {
		width: 90%;
		margin: 5% auto 0%;
		padding: 2%;
		border-radius: 15px;
		background-color: #fff;
		position: relative;
	}

	.eqponame {
		text-align: center;
		font-size: 18px;
		font-weight: bold;
		word-break: break-all;
		color: #2797ff;
		margin: 2% 0%;
	}

	.upview {
		display: inline-block;
		width: 50%;
		margin: 2% 0;
	}

	.topzuosn {
		text-align: center;
		color: #1e1d2d;
		font-size: 16px;
		font-weight: bold;
		word-break: break-all;
	}

	.toppng {
		height: 80rpx;
	}

	.powertext {
		text-align: center;
		font-size: 16px;
		font-weight: bold;
		position: relative;
		top: 5rpx;
	}

	.zaixin {
		top: 8rpx;
		margin: auto;
		position: relative;
		width: 50%;
	}

	.center {
		display: flex;
		flex-wrap: wrap;
	}

	.TC {
		margin: 50rpx 100rpx;
	}

	.TCtitle {
		color: #2979ff;
		text-align: center;
		font-size: 32rpx;
		font-weight: bold;
		margin: 20rpx;
	}

	.powerhong {
		color: #e43d33;
	}

	.powerhuang {
		color: #f3a73f;
	}

	.powerlv {
		color: #18bc37;
	}

	.powerhei {
		color: #515151;
	}

	.centerview {
		flex-grow: 1;
		font-weight: 600;
		font-size: 18px;
		width: 50%;
		margin: 2% 0%;
	}

	.dipsigntitle {
		text-align: center;
		margin: 5px;
		font-size: 15px;
	}

	.dipsigntext {
		font-size: 15px;
		text-align: center;
		margin-bottom: 10rpx;
	}

	.below {
		padding: 0% 5% 5%;
	}

	.status {
		color: #2979ff;
		display: flex;
	}

	.status view {
		flex-grow: 2;
		text-align: center;
		line-height: 90rpx;
		font-size: 15px;
	}

	.status .right {
		position: relative;
		top: 20rpx;
		left: 20rpx;
	}

	.danwei {
		width: 35px;
		font-size: 17px;
		text-align: center;
	}

	.button {
		width: 40%;
		display: inline-block;
		margin: 3% 5% 0%;
	}
</style>